<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>驴妈妈统计系统</title>
<meta name="description" content="overview &amp; stats" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<!-- bootstrap & fontawesome -->
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/bootstrap.css" />
<link rel="stylesheet"
	href="${request.contextPath}/static/assets/font-awesome/4.5.0/css/font-awesome.min.css" />
<!-- page specific plugin styles -->
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/jquery.gritter.min.css" />
<!-- text fonts -->
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/fonts.googleapis.com.css" />
<!-- ace styles -->
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/ace.min.css"
	class="ace-main-stylesheet" id="main-ace-style" />
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/ace-skins.min.css" />
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/ace-rtl.min.css" />
<link rel="stylesheet" href="${request.contextPath}/static/stylesheets/daterangepicker.css">
<link rel="stylesheet" href="${request.contextPath}/static/assets/css/bootstrap-datepicker3.min.css">
<script src="${request.contextPath}/assets/js/jquery-2.1.4.min.js"></script>
<style type="text/css">
.page-content {
	padding: 0px 0px 0px !important;
}

.ace-icon {
	cursor: pointer;
}
</style>
</head>
<body class="skin-2" style="background-color: #FFF;">
		<div class="page-content">
			<div class="tabbable">
				<div class="tab-content">
				   <div id="manage" class="tab-pane active in">
					<div class="row">
						<div class="col-xs-12">
								<div class="widget-box">
									<div class="widget-body" style="background-color: #EFF3F8;">
										<div class="widget-main">											
											<form class="form-inline" id="searchForm" method="post" action="${request.contextPath}/ticketReports/commodity/show">
											<input type="hidden" id="_csrf" name="${_csrf.parameterName}" value="${_csrf.token}" />
												<div class="form-group" style="width: 100%;">
													<label for="exampleInputName">监控平台
														<select name="companyCode" id="companyCode" aria-controls="dynamic-table" class="form-control input-sm" style="width:100px;height:34px">
															<!-- <option value="LMM">驴妈妈</option> -->
															<option value="XC" <#if ticketCommodityGrade.companyCode=="XC">selected</#if>>携程</option>
															<option value="TC" <#if ticketCommodityGrade.companyCode=="TC">selected</#if>>同程</option>
															<option value="TN" <#if ticketCommodityGrade.companyCode=="TN">selected</#if>>途牛</option>
															<option value="QNR" <#if ticketCommodityGrade.companyCode=="QNR">selected</#if>>去哪儿</option>
															<option value="MT" <#if ticketCommodityGrade.companyCode=="MT">selected</#if>>美团</option>
														</select>
													</label>
													<label  for="exampleInputName" style="margin-left: 30px;">产品ID
														<input class="form-control" name="productId" id="productId" value="<#if ticketCommodityGrade.productId??>${ticketCommodityGrade.productId}</#if>" placeholder="模糊查询产品ID" type="text" style="width:123px">
													</label>
													<!-- <label  for="exampleInputName" style="margin-left: 30px;">景点名称
														<input class="form-control" name="sceneryName" id="sceneryName" value="" placeholder="模糊查询景点名称" type="text" style="width:123px">
													</label>
													<label  for="exampleInputName" style="margin-left: 30px;">所属省份
														<input class="form-control" name="provinceName" id="provinceName" value="" placeholder="模糊查询所属省份" type="text" style="width:123px" style="width:123px">
													</label> -->
													<button type="submit" class="btn btn-pink btn-sm" id="search"  style="margin-left: 30px;">
														<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>查询
													</button>
													<label style="float: right;padding-right: 10px;cursor: pointer;">
														<span class="label label-lg label-yellow arrowed-in arrowed-in-right" id="export">导出</span>
													</label>
												</div>
											</form>	
											
											<form action="${request.contextPath}/ticketReports/commodity/export" id="exportForm" method="post" hidden="true">
												<input type="hidden" id="_csrf" name="${_csrf.parameterName}" value="${_csrf.token}" />
												<input id="companyCodeExport" name="companyCode" type="text" hidden="true">
												<!-- <input id="productIdExport" name="productId" type="text" hidden="true">
												<input id="sceneryNameExport" name="sceneryName" type="text" hidden="true">
												<input id="provinceNameExport" name=provinceName type="text" hidden="true"> -->
												<button type="submit" hidden="true" id="exportExcel" class="btn btn-primary" ></button>
											</form>
										</div>
									</div>
								</div>
							</div>
							
							<div class="col-xs-12">
								<table id="dynamic-table" 
									class="table table-striped table-bordered table-hover dataTable no-footer" 
									role="grid" aria-describedby="dynamic-table_info">
										<thead>
											<tr>
												<th>商品ID</th>
												<th>商品名称</th>
												<th>驴妈妈商品ID</th>
												<th>驴妈妈产品ID</th>
												<th>驴妈妈产品名称</th>
												<th>价格得分</th>
												<th>驴妈妈价格得分</th>
												<th>促销得分</th>
												<th>驴妈妈促销得分</th>
												<th>预定得分</th>
												<th>驴妈妈预定得分</th>
												<th>退改得分</th>
												<th>驴妈妈退改得分</th>
											</tr>
										</thead>
										<tbody>
										      	<#if resultList?? && resultList?size&gt;0> 
										      	<#list  resultList as commodity>
												<tr class="">
												    <td>${commodity.commodityId!}</td>
													<td>${commodity.commodityName!}</td>
												    <td>${commodity.lmmCommodityId!}</td>
												    <td>${commodity.lmmProductId!}</td>
												    <td>${commodity.lmmSceneryName!}</td>
												    <td>${commodity.salePriceGrade!}</td>
												    <td>${commodity.lmmSalePriceGrade!}</td>
												    <td>${commodity.preferentialGrade!}</td>
												    <td>${commodity.lmmPreferentialGrade!}</td>
												    <td>${commodity.bookTimeGrade!}</td>
												    <td>${commodity.lmmBookTimeGrade!}</td>
												    <td>${commodity.refundCondGrade!}</td>
												    <td>${commodity.lmmRefundCondGrade!}</td>
												</tr>
									    </#list>
										</#if>
									</tbody>
									</table>
                                    <#include "/paginator.html">
							</div>
						</div>
				</div>
			</div>
		</div>
	</div> 
	<script src="${request.contextPath}/static/assets/js/bootstrap.min.js"></script>
	<!-- page specific plugin scripts -->
	<script type="text/javascript" src="${request.contextPath}/static/javascripts/moment.js"></script>
	<script type="text/javascript" src="${request.contextPath}/static/javascripts/daterangepicker.js"></script>
	<script src="${request.contextPath}/static/assets/js/bootbox.js"></script>
	<!-- ace scripts -->
	<script src="${request.contextPath}/static/assets/js/jquery.gritter.min.js"></script>
	<script src="${request.contextPath}/static/assets/js/ace-elements.min.js"></script>
	<script src="${request.contextPath}/static/assets/js/ace.min.js"></script>
	<!-- user scripts -->
	<script src="${request.contextPath}/static/assets/js/user/base.js"></script>
	<script src="${request.contextPath}/static/assets/js/moment.min.js"></script>
	<script src="${request.contextPath}/static/assets/js/bootstrap-datepicker.min.js"></script>
	
	<script type="text/javascript">
		
		/* $("#companyCode").change(function(){
			$("#productId").val(null);
			$("#sceneryName").val(null);
			$("#provinceName").val(null);
		}); */
			
		$("#export").on("click",function(){
			var companyCode=$("#companyCode").val();
			/* var productId=$("#productId").val();
			var sceneryName=$("#sceneryName").val();
			var provinceName=$("#provinceName").val(); */
			$("#companyCodeExport").val(companyCode);
			/* $("#productIdExport").val(productId);
			$("#sceneryNameExport").val(sceneryName);
			$("#provinceNameExport").val(provinceName); */
			$("#exportExcel").click();
		}); 
		
	</script>
</body>
</html>